
import java.awt.Component;
import java.awt.FlowLayout;

import javax.swing.JPanel;

public class MethodManager implements Drawable {

	public static String IDLE = "Idle";
	private static MethodManager instance = null;

	private Segment jsSegment;

	private JSAnalyze jsAnalyze;

	private JSDice jsDice;
	
	private MethodManager() {
		jsSegment = new Segment();
		jsAnalyze = new JSAnalyze();
		jsDice = new JSDice();
	}

	public static MethodManager getInstance() {
		if (instance == null)
			instance = new MethodManager();
		return instance;
	}

	public Component drawContentPane() {
		JPanel buttonPane = new JPanel();
		buttonPane.setLayout(new FlowLayout());

		buttonPane.add(jsSegment.drawContentPane());
		buttonPane.add(jsAnalyze.drawContentPane());
		buttonPane.add(jsDice.drawContentPane());
		return buttonPane;
	}

	public void setEnable(boolean enable) {
		jsSegment.setEnable(enable);
		jsAnalyze.setEnable(enable);
		jsDice.setEnable(enable);
	}

}
